/******************************************************************************
*   Project:		DotNetCRM 
*	Filename:		Account.cs
*	Author:			Kristopher Cargile <kris@kriscargile.com>
*	Date Created:	07/02/2008
*******************************************************************************
*	Change History: 
*******************************************************************************
* IMPORTANT GNU LICENSE INFORMATION. DO NOT REMOVE THIS SECTION!
*
* DotNetCRM :: Copyright (c) 2005-2010, Cargile Technology Group, LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
******************************************************************************/

using System;
using System.Collections.Generic;

// TODO: add validation decorators
// TODO: filtering strategy

namespace DotNetCRM.Core
{
    /// <summary>
    /// Lead priority.
    /// </summary>
    public enum LeadPriority
    {
        /// <summary>
        /// Unknown
        /// </summary>
        Unknown,

        /// <summary>
        /// Hot
        /// </summary>
        Hot,

        /// <summary>
        /// Warm
        /// </summary>
        Warm,

        /// <summary>
        /// Cold
        /// </summary>
        Cold
    }

    /// <summary>
    /// Credit rating.
    /// </summary>
    public enum CreditRating
    {
        /// <summary>
        /// Unknown
        /// </summary>
        Unknown
    }

    /// <summary>
    /// Represents account status.
    /// </summary>
    public enum AccountStatus
    {
        /// <summary>
        /// Unknown
        /// </summary>
        Unknown,

        /// <summary>
        /// Open
        /// </summary>
        Open,

        /// <summary>
        /// Closed
        /// </summary>
        Closed,

        /// <summary>
        /// Pending
        /// </summary>
        Pending
    }

	/// <summary>
	/// A customer account.
	/// </summary>
    [Serializable]
	public class Account : DomainObject
	{
        /// <summary>
        /// Gets or sets the id of the parent company id.
        /// </summary>
        public int CompanyId { get; set; }

        /// <summary>
        /// Gets or sets the related lead source id.
        /// </summary>
        public int LeadSourceId { get; set; }

        /// <summary>
        /// Gets or sets the id of the employee assigned to the account.
        /// </summary>
        public int SalesRepId { get; set; }

        /// <summary>
        /// Gets or sets the id of the employee who established the account.
        /// </summary>
        public int EstablishedById { get; set; }

        /// <summary>
        /// Gets or sets the id of the primary contact for the account.
        /// </summary>
        public int ContactId { get; set; }

        /// <summary>
        /// Gets or sets the nuumber or employees at the company.
        /// </summary>
        public int? NumberOfEmployees { get; set; }

        /// <summary>
        /// Gets or sets the telephone number for the account.
        /// </summary>
        public string TelephoneNumber { get; set; }

        /// <summary>
        /// Gets or sets the fax number for the account.
        /// </summary>
        public string Fax { get; set; }

        /// <summary>
        /// Gets or sets the primary email address for the account.
        /// </summary>
        public string EmailAddress { get; set; }

        /// <summary>
        /// Gets or sets the website URL for the account.
        /// </summary>
        public string Url { get; set; }

        /// <summary>
        /// Gets or sets the location ids for the account.
        /// </summary>
        public int[] LocationId { get; set; }

        /// <summary>
        /// Gets or sets the current <see cref="AccountStatus"/>.
        /// </summary>
        public AccountStatus Status { get; set; }

        /// <summary>
        /// Gets or sets the next callback date for the account.
        /// </summary>
        public DateTime? CallbackDate { get; set; }

        /// <summary>
        /// Gets or sets the industry types of this account.
        /// </summary>
        public int[] IndustryTypeId { get; set; }

        /// <summary>
        /// Gets or sets the number of years the account has been open for business.
        /// </summary>
        public int? YearsOpen { get; set; }

        /// <summary>
        /// True if the account has been qualified; otherwise, false. 
        /// </summary>
        public bool IsQualified { get; set; }

        /// <summary>
        /// Gets or sets the credit rating of the account.
        /// </summary>
        public CreditRating Credit { get; set; }

        /// <summary>
        /// Gets or sets the <see cref="LeadPriority"/> of the account.
        /// </summary>
        public LeadPriority Priority { get; set; }

	    /// <summary>
        /// Loads an object from persistent storage. 
        /// </summary>
        /// <param name="id">Id of the record to load.</param>
        public override void Load(int id)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Loads a list of objects from persistent storage. 
        /// </summary>
        public static List<Account> Load()
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Adds or updates the object in persistent storage.
        /// </summary>
        /// <returns>Number of records affected.</returns>
        public override int Save()
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Adds or updates a batch of objects in persistent storage. 
        /// </summary>
        /// <param name="list">List of records to add or update.</param>
        /// <returns>Number of records affected.</returns>
        public static int Save(List<Account> list)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Deletes the object from persistent storage.
        /// </summary>
        /// <returns>Number of records affected.</returns>
        public override int Delete()
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Deletes a batch of objects from persistent storage. 
        /// </summary>
        /// <param name="list">List of records to add or update.</param>
        /// <returns>Number of records affected.</returns>
        public static int Delete(Account[] list)
        {
            throw new NotImplementedException();
        }
    }
}